<%- include("./side.html") %>
<!-- 样式 -->
<link rel="stylesheet" href="/css/front-home.css">
<link rel="stylesheet" href="/css/page.css">
<div class="main" id="main" >
	<% datas.datalist.forEach(function (item) {%>   
	<div class="block">
		<h1 class="h1"> 
			<span><a class="black" href="/detail/<%= item.id %>"><%= item.title %></a></span>
			<div class="right fr">
				<span><%= item.createTime %></span>
				<span>From : <%= item.author %></span>
			</div>
		</h1>
		<div class="text">
			<a class="bl555" href="/detail/<%= item.id %>"><%- item.describes %></a>
		</div>
		<div class="bottom">
			<div class="fl">
				<span class="iconfont">&#xe610;</span> : 
				<a class="tag" href="/search?tagid=<%= item.tagid %>"><%= item.tagname %></a>
			</div>
			<div class="fr"><a class="pl" href="/detail/<%= item.id %>?isComment=true"><span class="iconfont">&#xe60e;</span>评论</a></div>
		</div>
	</div>
	<% })%>

	<!--  分页 -->
	<div class="tc clearfix mt30">
		<div id="copot-page"></div>
	</div>
</div>
<%- include("./footer.html") %>

<script src="/js/Page.js"></script>
<script>
// 分页
	var pageNo = '<%- datas.pageNo %>'
	var pageSize = '<%- datas.pageSize %>'
	var totalNum ='<%- datas.totalNum %>'

	$(function() {
		new Page({
			parent: $("#copot-page"),
			nowPage: pageNo,
			pageSize: pageSize,
			totalCount: totalNum,
			callback: function(nowPage, totalPage) {
				var url = '/?pageNo='+nowPage
				location.href = url
			}
		});
	});
</script>

